/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PnlListProduct.java
 *
 * Created on 14 ม.ค. 2553, 13:17:48
 */

package Inventory;

/**
 *
 * @author Administrator
 */
public class PnlListProduct extends javax.swing.JPanel {

    /** Creates new form PnlListProduct */
    public PnlListProduct() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlHeadListPro = new javax.swing.JPanel();
        lblHeadListPro = new javax.swing.JLabel();
        btnProListSearch = new javax.swing.JButton();
        btnProListAdd = new javax.swing.JButton();
        btnProListDel = new javax.swing.JButton();
        btnProListEdit = new javax.swing.JButton();
        btnProPrint = new javax.swing.JButton();
        pnlListPro = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        tblListProduct = new javax.swing.JTable();
        lblDTCode = new javax.swing.JLabel();
        lblProCode = new javax.swing.JLabel();
        lblProName = new javax.swing.JLabel();
        lblUnName = new javax.swing.JLabel();
        lblProPrice = new javax.swing.JLabel();
        lblExp = new javax.swing.JLabel();
        lblProOrder = new javax.swing.JLabel();
        lblSProName = new javax.swing.JLabel();
        cmbDTCode = new javax.swing.JComboBox();
        txtProCode = new javax.swing.JTextField();
        txtProName = new javax.swing.JTextField();
        txtProPrice = new javax.swing.JTextField();
        txtUnName = new javax.swing.JTextField();
        txtProExp = new javax.swing.JTextField();
        txtProOrder = new javax.swing.JTextField();
        rbtStaProMend = new javax.swing.JRadioButton();
        rbtStaProInventory = new javax.swing.JRadioButton();
        rbtStaProPos = new javax.swing.JRadioButton();
        rbtStaProChang = new javax.swing.JRadioButton();

        setMaximumSize(new java.awt.Dimension(700, 500));
        setMinimumSize(new java.awt.Dimension(700, 500));
        setPreferredSize(new java.awt.Dimension(700, 500));
        setLayout(new java.awt.BorderLayout());

        pnlHeadListPro.setBackground(new java.awt.Color(204, 255, 204));
        pnlHeadListPro.setMinimumSize(new java.awt.Dimension(700, 80));
        pnlHeadListPro.setPreferredSize(new java.awt.Dimension(700, 80));

        lblHeadListPro.setFont(new java.awt.Font("Tahoma", 1, 16));
        lblHeadListPro.setText("จัดการรายการสินค้า");

        btnProListSearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/search_30x30.gif"))); // NOI18N

        btnProListAdd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/add_30x30.gif"))); // NOI18N

        btnProListDel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/del_30x30.gif"))); // NOI18N

        btnProListEdit.setFont(new java.awt.Font("Tahoma", 0, 14));
        btnProListEdit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/edit1_30x30.gif"))); // NOI18N
        btnProListEdit.setMaximumSize(new java.awt.Dimension(75, 30));
        btnProListEdit.setMinimumSize(new java.awt.Dimension(75, 30));
        btnProListEdit.setPreferredSize(new java.awt.Dimension(75, 30));

        btnProPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icon/print_30x30.gif"))); // NOI18N
        btnProPrint.setMaximumSize(new java.awt.Dimension(65, 40));
        btnProPrint.setMinimumSize(new java.awt.Dimension(65, 40));
        btnProPrint.setPreferredSize(new java.awt.Dimension(65, 40));

        javax.swing.GroupLayout pnlHeadListProLayout = new javax.swing.GroupLayout(pnlHeadListPro);
        pnlHeadListPro.setLayout(pnlHeadListProLayout);
        pnlHeadListProLayout.setHorizontalGroup(
            pnlHeadListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadListProLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlHeadListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblHeadListPro)
                    .addGroup(pnlHeadListProLayout.createSequentialGroup()
                        .addComponent(btnProListSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnProListAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnProListDel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnProListEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(btnProPrint, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(438, Short.MAX_VALUE))
        );
        pnlHeadListProLayout.setVerticalGroup(
            pnlHeadListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlHeadListProLayout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(pnlHeadListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnProPrint, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(pnlHeadListProLayout.createSequentialGroup()
                        .addComponent(lblHeadListPro)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlHeadListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(btnProListSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnProListAdd, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnProListDel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnProListEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        add(pnlHeadListPro, java.awt.BorderLayout.PAGE_START);

        pnlListPro.setMinimumSize(new java.awt.Dimension(700, 381));
        pnlListPro.setPreferredSize(new java.awt.Dimension(700, 381));

        tblListProduct.setFont(new java.awt.Font("Tahoma", 0, 12));
        tblListProduct.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "ประเภทสินค้า", "ชื่อสินค้า", "ราคา/หน่วย", "หน่วย", "วันหมดอายุ"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        jScrollPane1.setViewportView(tblListProduct);

        lblDTCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblDTCode.setText("ประเภทสินค้า :");

        lblProCode.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProCode.setText("รหัสสินค้า :");

        lblProName.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProName.setText("ชื่อสินค้า :");

        lblUnName.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblUnName.setText("หน่วย :");

        lblProPrice.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProPrice.setText("ราคา/หน่วย :");

        lblExp.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblExp.setText("วันหมดอายุ :");

        lblProOrder.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblProOrder.setText("จุดสั่งซื้อซ้ำ :");

        lblSProName.setFont(new java.awt.Font("Tahoma", 0, 12));
        lblSProName.setText("สถานะสินค้า :");

        cmbDTCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtProCode.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtProName.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtProPrice.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtUnName.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtProExp.setFont(new java.awt.Font("Tahoma", 0, 12));

        txtProOrder.setFont(new java.awt.Font("Tahoma", 0, 12));

        rbtStaProMend.setFont(new java.awt.Font("Tahoma", 0, 12));
        rbtStaProMend.setText("ซ่อม");
        rbtStaProMend.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaProMendActionPerformed(evt);
            }
        });

        rbtStaProInventory.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        rbtStaProInventory.setText("คลัง");
        rbtStaProInventory.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaProInventoryActionPerformed(evt);
            }
        });

        rbtStaProPos.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        rbtStaProPos.setText("หน้าร้าน");
        rbtStaProPos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaProPosActionPerformed(evt);
            }
        });

        rbtStaProChang.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        rbtStaProChang.setText("เครม");
        rbtStaProChang.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtStaProChangActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlListProLayout = new javax.swing.GroupLayout(pnlListPro);
        pnlListPro.setLayout(pnlListProLayout);
        pnlListProLayout.setHorizontalGroup(
            pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlListProLayout.createSequentialGroup()
                .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlListProLayout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblDTCode, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblProPrice, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblProOrder, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(txtProOrder)
                            .addComponent(txtProPrice)
                            .addComponent(cmbDTCode, 0, 129, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblProCode)
                            .addComponent(lblUnName)
                            .addComponent(lblSProName))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlListProLayout.createSequentialGroup()
                                .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(txtUnName)
                                    .addComponent(txtProCode, javax.swing.GroupLayout.DEFAULT_SIZE, 141, Short.MAX_VALUE))
                                .addGap(14, 14, 14)
                                .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblProName, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(lblExp, javax.swing.GroupLayout.Alignment.TRAILING))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(txtProExp)
                                    .addComponent(txtProName, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)))
                            .addGroup(pnlListProLayout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(rbtStaProInventory)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(rbtStaProPos)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(rbtStaProMend)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(rbtStaProChang))))
                    .addGroup(pnlListProLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 680, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        pnlListProLayout.setVerticalGroup(
            pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlListProLayout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlListProLayout.createSequentialGroup()
                        .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cmbDTCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblDTCode))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblProPrice)
                            .addComponent(txtProPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblProOrder)
                            .addComponent(txtProOrder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(pnlListProLayout.createSequentialGroup()
                        .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblProCode)
                            .addComponent(txtProCode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblProName)
                            .addComponent(txtProName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(lblUnName)
                            .addComponent(txtUnName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(lblExp, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtProExp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlListProLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(rbtStaProInventory)
                                .addComponent(rbtStaProPos)
                                .addComponent(rbtStaProMend)
                                .addComponent(rbtStaProChang))
                            .addComponent(lblSProName))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 255, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(57, 57, 57))
        );

        add(pnlListPro, java.awt.BorderLayout.CENTER);
    }// </editor-fold>//GEN-END:initComponents

    private void rbtStaProInventoryActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaProInventoryActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaProInventoryActionPerformed

    private void rbtStaProPosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaProPosActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaProPosActionPerformed

    private void rbtStaProMendActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaProMendActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaProMendActionPerformed

    private void rbtStaProChangActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtStaProChangActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_rbtStaProChangActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnProListAdd;
    private javax.swing.JButton btnProListDel;
    private javax.swing.JButton btnProListEdit;
    private javax.swing.JButton btnProListSearch;
    private javax.swing.JButton btnProPrint;
    private javax.swing.JComboBox cmbDTCode;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblDTCode;
    private javax.swing.JLabel lblExp;
    private javax.swing.JLabel lblHeadListPro;
    private javax.swing.JLabel lblProCode;
    private javax.swing.JLabel lblProName;
    private javax.swing.JLabel lblProOrder;
    private javax.swing.JLabel lblProPrice;
    private javax.swing.JLabel lblSProName;
    private javax.swing.JLabel lblUnName;
    private javax.swing.JPanel pnlHeadListPro;
    private javax.swing.JPanel pnlListPro;
    private javax.swing.JRadioButton rbtStaProChang;
    private javax.swing.JRadioButton rbtStaProInventory;
    private javax.swing.JRadioButton rbtStaProMend;
    private javax.swing.JRadioButton rbtStaProPos;
    private javax.swing.JTable tblListProduct;
    private javax.swing.JTextField txtProCode;
    private javax.swing.JTextField txtProExp;
    private javax.swing.JTextField txtProName;
    private javax.swing.JTextField txtProOrder;
    private javax.swing.JTextField txtProPrice;
    private javax.swing.JTextField txtUnName;
    // End of variables declaration//GEN-END:variables

}
